package com.xymtop.api.implement;


import com.xymtop.api.entity.PStudent;
import com.xymtop.api.mapper.PStudentMapper;
import com.xymtop.api.service.PStudentService;
import com.xymtop.api.vo.StuVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName : PStudentImpl
 * @Description : 学生信息实现类
 * @Author : 肖叶茂
 * @Date: 2022/12/1  16:43
 */

@Service
public class PStudentImpl implements PStudentService {

    @Autowired
    private PStudentMapper pStudentMapper;

    @Override
    public int add(PStudent pStudent) {
       return pStudentMapper.add(pStudent.getProjectid(),pStudent.getUserid(),pStudent.getHead(),pStudent.getRank(),pStudent.getTime());

    }

    @Override
    public int delete(String projectid, String userid) {
        return  pStudentMapper.delete(projectid,userid);
    }

    @Override
    public int changeRank(String id, String userid, String rank) {
        return  pStudentMapper.changeRank(id,userid,rank);
    }

    @Override
    public int changeHead(String id, String userid, String head) {
      return   pStudentMapper.changeHead(id, userid, head);

    }


    @Override
    public PStudent get(String projectid, String userid) {
        return pStudentMapper.get(projectid, userid);
    }

    @Override
    public List<StuVO> getStuList(String projectid) {
        return pStudentMapper.getList(projectid);
    }


}
